<!DOCTYPE html>
<html>
<head>
    <title>登录 - E姐姐方案生成</title>
    <link rel="stylesheet" href="../static/css/ej.css">
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> 
    <style>
        .login-container {
            max-width: 400px;
            margin: 100px auto;
            padding: 30px;
            background-color: #fff;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
        }
        
        .login-title {
            color: #dd91ca;
            font-size: 28px;
            margin-bottom: 30px;
        }
        
        .login-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .form-group {
            text-align: left;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #616060;
            font-weight: bold;
        }
        
        .form-group input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 5px;
            font-size: 16px;
            box-sizing: border-box;
        }
        
        .form-group input:focus {
            outline: none;
            border-color: #dd91ca;
        }
        
        .login-button {
            background-color: #f3d9ea;
            color: rgb(124, 69, 115);
            border: none;
            padding: 15px;
            border-radius: 5px;
            font-size: 18px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        
        .login-button:hover {
            background-color: #e8c4dc;
        }
        
        .error-message {
            color: #e74c3c;
            margin-top: 15px;
            padding: 10px;
            background-color: #fdf2f2;
            border-radius: 5px;
            border: 1px solid #f5c6cb;
        }
    </style>
</head>
<body style="background-color:#fffbf6">
    <div class="login-container">
        <h1 class="login-title">登录系统</h1>
        
        <form class="login-form" method="POST" action="{{ url_for('login') }}">
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" id="username" name="username" required autocomplete="username">
            </div>
            
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" required autocomplete="current-password">
            </div>
            
            <button type="submit" class="login-button">登录</button>
        </form>
        
        {% if error %}
        <div class="error-message">
            {{ error }}
        </div>
        {% endif %}
    </div>
</body>
</html>
